package cn.project.lemontree.service.impl;

import cn.project.lemontree.bean.Red_flower;
import cn.project.lemontree.dao.Red_flowerDao;
import cn.project.lemontree.service.Red_flowerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class Red_flowerServiceImpl extends ServiceImpl<Red_flowerDao, Red_flower> implements Red_flowerService {
    @Resource
    private  Red_flowerDao red_flowerDao;
    @Override
    public List<Red_flower> listPage(int page, int size, String childName) {
        return red_flowerDao.listPage((page-1)*size,size,childName);
    }

    @Override
    public int count(String childName) {
        return red_flowerDao.count(childName);
    }

    @Override
    public boolean save(Red_flower redFlower) {
        return red_flowerDao.save(redFlower)>0;
    }
}
